package com.test.core;

import java.io.IOException;

import org.beetl.core.Configuration;
import org.beetl.core.GroupTemplate;
import org.beetl.core.resource.WebAppResourceLoader;

/**
 * web使用模版引擎
 * @author Administrator
 *
 */
public class WebCreat implements CreatCore {

	@Override
	public GroupTemplate getTemplate(String name) throws IOException {
		WebAppResourceLoader resourceLoader = new WebAppResourceLoader();
		resourceLoader.setRoot(resourceLoader.getRoot()+name);
		Configuration cfg = Configuration.defaultConfiguration();
		GroupTemplate gt = new GroupTemplate(resourceLoader, cfg);
		return gt;
	}
	public static WebCreat getWebCreat(){
		return new WebCreat();
	}
}
